import React, { FC } from "react";
import { useNavigate, Link } from "react-router-dom";
import { Button, Typography } from "antd";
import { MANAGE_INDEX_PATHNANME } from "../router";
import styles from "./Home.module.scss";

const { Title, Paragraph } = Typography;

const Home: FC = function Home() {
  const navigate = useNavigate();
  // function clickHandle() {
  //   navigate({
  //     pathname: "/login",
  //     search: "?from=home",
  //   });
  // }
  return (
    <div className={styles.container}>
      <div className={styles.info}>
        <Title>问卷调查 | 在线投票</Title>
        <Paragraph>已累计创建问卷100份，发布问卷90份，收到答卷980份</Paragraph>
        <div>
          <Button
            type="primary"
            onClick={() => navigate(MANAGE_INDEX_PATHNANME)}
          >
            开始使用
          </Button>
        </div>
      </div>
    </div>
  );
};

export default Home;
